<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="include/taglib.jsp"%>
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--[if lt IE 9]><script src="${ctx}/assets/js/html5.js"></script><![endif]-->
<meta charset="utf-8" />
<title>index</title>
<link rel="stylesheet" href="${ctx}/assets/css/style.css" />
<script src="${ctx}/assets/js/jquery-1.7.1.min.js"></script>
<script src="${ctx}/assets/js/jquery.masonry.min.js"></script>
<script src="${ctx}/assets/js/jquery.infinitescroll.min.js"></script>
<script src="${ctx}/assets/js/jquery.blockUI.js"></script>
<script type="text/javascript">
<!--
	$(function() {
		$("#lg").click(function(){
			$("#loginBtn").click();
		});
		$("#sb").click(function(){
			if(!$("#r_username").val()) {
				alert("用户名不能为空!");
			} else if(!$("#r_passwd").val()) {
				alert("密码不能为空!");
			} else if($("#r_passwd").val() != $("#r_passwd2").val()) {
				alert("确认密码与密码不一致!");
			} else {
				document.forms["rf"].submit();
			}
		});
		<c:if test="${r_rst == 'ok'}">
		$("#loginBtn").click();
		alert("注册成功，请登录!");
		</c:if>
		<c:if test="${r_rst == 'fail'}">
		alert("用户名已经存在，请重新注册!");
		</c:if>
	});
//-->
</script>
</head>
<body>
	<%@include file="include/head.jsp"%>
	<div class="vote-contain clearfix container_12" id="container1">
		<div class="grid_8 prefix_3 content">
			<div id="register_box">
				<div id="register_left">
					<h1>新用户注册</h1>

					<div id="register_center">
						<div id="register_form">
							<form action="${ctx }/register" method="post" id="rf" name="rf">
								<div class="ipt_txt">
									<span>　用户名：</span><input id="r_username" type="text"
										maxlength="36" name="username" class="text r3" value="">
								</div>
								<div class="ipt_txt">
									<span>电子邮件：</span><input id="r_email"
										style="*margin-left: -1px;" maxlength="36" type="text"
										name="email" class="text r3" value="">
								</div>
								<div class="ipt_txt">
									<span>　　性别：</span>
									<div class="rdo">
										<input type="radio" name="gender" value="0" checked="checked"
											class="ck">女<input style="margin-left: 10px"
											type="radio" name="gender" value="1" class="ck">男
									</div>
								</div>
								<div class="ipt_txt">
									<span>　　密码：</span><input id="r_passwd"
										style="*margin-left: -1px;" maxlength="36" type="password"
										name="passwd" class="text r3">
								</div>
								<div class="ipt_txt">
									<span>确认密码：</span><input id="r_passwd2"
										type="password" maxlength="36" name="passwd2"
										class="text r3">
								</div>
								<br /><br />
								<div class="ipt_txt">
									<span class="blike" style="height: 30px;line-height: 30px; width: 70px;cursor: pointer;color: white" id="sb">注　册</span>
								</div>
							</form>
						</div>
					</div>
				</div>
				<div id="register_right">
					<div class="rst_login">
						<span>已经有帐号？请直接登录</span> <span class="like" id="lg" style="height: 30px;line-height: 30px; width: 70px;cursor: pointer;color: white">登　录</span>
					</div>
					<div class="other_login">
						<span>您也可以用以下方式登录：</span>
					</div>
				</div>
			</div>
		</div>
	</div>
	<%@include file="include/foot.jsp" %>
</body>
</html>